#pragma once

#include <QWidget>
#include "ui_RevolWidget.h"
#include "modelSoft.h"
#include <revolFeature.h>

QT_BEGIN_NAMESPACE
namespace Ui { class RevolWidgetClass; };
QT_END_NAMESPACE

class RevolWidget : public QWidget
{
	Q_OBJECT

public:
	RevolWidget(modelSoft *myModelSoft, QWidget *parent = nullptr);
	~RevolWidget();

protected:
	void createConnection();
	void onClickModify();
	void onClickConfirm();
	void onClickCancel();
	void onClickSelect();
	void onClickCancelSelect();
	void typeChange(int type);

public:
	void receiveRevolSelectedShape(const TopoDS_Shape& subShape, Handle(QIVtkSelectionPipeline) pipeline);


private:
	Ui::RevolWidgetClass *ui;
	modelSoft* myModelSoft;
	//0:Vertex 1:Edge 2:Face
	int typeTag;
	bool isModified;
	TopoDS_Shape selectShape;
	Handle(QIVtkSelectionPipeline) resultPipeline;
	RevolFeature* revolFeature;
	bool confirmCreated = false;
	bool targetReceive = false;
};
